Optimal. Leaf size=182 \[ \frac{2 b n \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{\log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^2 r}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.426535, antiderivative size = 182, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {2349, 2345, 2374, 6589, 2338, 2391} \[ \frac{2 b n \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{\log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^2 r}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2349
Rule 2345
Rule 2374
Rule 6589
Rule 2338
Rule 2391
Rubi steps
\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )^2} \, dx &=\frac{\int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx}{d}-\frac{e \int \frac{x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^r\right )^2} \, dx}{d}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}+\frac{(2 b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r}-\frac{(2 b n) \int \frac{a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx}{d r}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (2 b^2 n^2\right ) \int \frac{\log \left (1+\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r^2}-\frac{\left (2 b^2 n^2\right ) \int \frac{\text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r^2}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}-\frac{2 b^2 n^2 \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^2}+\frac{2 b^2 n^2 \text{Li}_3\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^3}\\ \end{align*}
Mathematica [B] time = 0.461516, size = 397, normalized size = 2.18 \[ \frac{2 a b n r \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )+2 b^2 n r \left (\log \left (c x^n\right )-n \log (x)\right ) \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )-2 b^2 n^2 \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )-b^2 n^2 \left (-2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )-2 r \log (x) \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )+r^2 \log ^2(x) \log \left (\frac{d x^{-r}}{e}+1\right )\right )-a^2 r^2 \log \left (d-d x^r\right )+\frac{d r^2 \left (a+b \log \left (c x^n\right )\right )^2}{d+e x^r}+2 a b r^2 \left (n \log (x)-\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+2 a b n r \log \left (d-d x^r\right )+b^2 \left (-r^2\right ) \left (\log \left (c x^n\right )-n \log (x)\right )^2 \log \left (d-d x^r\right )+2 b^2 n r \left (\log \left (c x^n\right )-n \log (x)\right ) \log \left (d-d x^r\right )}{d^2 r^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.851, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}}{x \left ( d+e{x}^{r} \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} a^{2}{\left (\frac{1}{d e r x^{r} + d^{2} r} + \frac{\log \left (x\right )}{d^{2}} - \frac{\log \left (\frac{e x^{r} + d}{e}\right )}{d^{2} r}\right )} + \int \frac{b^{2} \log \left (c\right )^{2} + b^{2} \log \left (x^{n}\right )^{2} + 2 \, a b \log \left (c\right ) + 2 \,{\left (b^{2} \log \left (c\right ) + a b\right )} \log \left (x^{n}\right )}{e^{2} x x^{2 \, r} + 2 \, d e x x^{r} + d^{2} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.45819, size = 1382, normalized size = 7.59 \begin{align*} \frac{b^{2} d n^{2} r^{3} \log \left (x\right )^{3} + 3 \, b^{2} d r^{2} \log \left (c\right )^{2} + 6 \, a b d r^{2} \log \left (c\right ) + 3 \, a^{2} d r^{2} + 3 \,{\left (b^{2} d n r^{3} \log \left (c\right ) + a b d n r^{3}\right )} \log \left (x\right )^{2} +{\left (b^{2} e n^{2} r^{3} \log \left (x\right )^{3} + 3 \,{\left (b^{2} e n r^{3} \log \left (c\right ) - b^{2} e n^{2} r^{2} + a b e n r^{3}\right )} \log \left (x\right )^{2} + 3 \,{\left (b^{2} e r^{3} \log \left (c\right )^{2} - 2 \, a b e n r^{2} + a^{2} e r^{3} - 2 \,{\left (b^{2} e n r^{2} - a b e r^{3}\right )} \log \left (c\right )\right )} \log \left (x\right )\right )} x^{r} - 6 \,{\left (b^{2} d n^{2} r \log \left (x\right ) + b^{2} d n r \log \left (c\right ) - b^{2} d n^{2} + a b d n r +{\left (b^{2} e n^{2} r \log \left (x\right ) + b^{2} e n r \log \left (c\right ) - b^{2} e n^{2} + a b e n r\right )} x^{r}\right )}{\rm Li}_2\left (-\frac{e x^{r} + d}{d} + 1\right ) - 3 \,{\left (b^{2} d r^{2} \log \left (c\right )^{2} - 2 \, a b d n r + a^{2} d r^{2} +{\left (b^{2} e r^{2} \log \left (c\right )^{2} - 2 \, a b e n r + a^{2} e r^{2} - 2 \,{\left (b^{2} e n r - a b e r^{2}\right )} \log \left (c\right )\right )} x^{r} - 2 \,{\left (b^{2} d n r - a b d r^{2}\right )} \log \left (c\right )\right )} \log \left (e x^{r} + d\right ) + 3 \,{\left (b^{2} d r^{3} \log \left (c\right )^{2} + 2 \, a b d r^{3} \log \left (c\right ) + a^{2} d r^{3}\right )} \log \left (x\right ) - 3 \,{\left (b^{2} d n^{2} r^{2} \log \left (x\right )^{2} +{\left (b^{2} e n^{2} r^{2} \log \left (x\right )^{2} + 2 \,{\left (b^{2} e n r^{2} \log \left (c\right ) - b^{2} e n^{2} r + a b e n r^{2}\right )} \log \left (x\right )\right )} x^{r} + 2 \,{\left (b^{2} d n r^{2} \log \left (c\right ) - b^{2} d n^{2} r + a b d n r^{2}\right )} \log \left (x\right )\right )} \log \left (\frac{e x^{r} + d}{d}\right ) + 6 \,{\left (b^{2} e n^{2} x^{r} + b^{2} d n^{2}\right )}{\rm polylog}\left (3, -\frac{e x^{r}}{d}\right )}{3 \,{\left (d^{2} e r^{3} x^{r} + d^{3} r^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{r} + d\right )}^{2} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]